<template>
    <div style="height:100%;width:100%;">
        <bar class="bar" @on-back="$router.back()" title="我的信息"> </bar>
        <group>
            <cell title="用户名" :value="item.contactName" is-link @click.native="$router.push('/editName')"></cell>
            <cell title="电话号码">
                <div>{{item.mobile}} <i class="ion ion-help-circled" @click="show = true"></i></div>
            </cell>
        </group>
        <group>
            <cell title="商户编号" :value="item.mchNo"></cell>
            <cell title="商户名称" :value="item.mchName"></cell>
        </group>
        <group>
            <cell title="企业名称" :value="item.companyName"></cell>
        </group>
        <confirm v-model="show" class="myInfo-confirm" cancelText="取消" confirmText="我知道了">
            <div style="padding:20px 10px;text-align:center;line-height:25px">
                <div>电话号码是登录账号，需要修改请联系管理员：<a href="tel:15922764574" style="color:blue">15922764574</a></div>
            </div>
        </confirm>
    </div>
</template>

<script>
    import {mapState} from 'vuex'
    import {mapMutations} from 'vuex'
    import VUEX_NAME from '../../store/constants.vue'
    import {
        Bar
    } from 'muka-ui'
    import {
        Group,
        Cell,
        Confirm
    } from 'vux'
    export default {
        name: 'detailOnly',
        components: {
            Bar,
            Group,
            Cell,
            Confirm
        },
        data: function () {
            return {
                show: false,
                item: {}
            }
        },
        created: function () {
            this.item = this.myInfo
        },
        computed: mapState([
            VUEX_NAME.myInfo
        ]),
        methods: {
            ...mapMutations([
                VUEX_NAME.cMyInfo
            ]),
        }
    }

</script>
<style lang="less">
    .myInfo-confirm {
        .weui-dialog__btn_default {
            display: none;
        }
    }

</style>
